<template>
  <div class="app-container">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="材料获取详情" name="material" />
      <el-tab-pane label="目标领取详情" name="target" />
      <div class="tab-content">
        <keep-alive>
          <component :is="curTabcompnents[activeName]" />
        </keep-alive>
      </div>
    </el-tabs>
  </div>
</template>

<script>
import materialAcquisition from './components/material-acquisition.vue'
import targetCollection from './components/target-collection.vue'
export default {
  components: { targetCollection, materialAcquisition },
  data() {
    return {
      activeName: 'material',
      curTabcompnents: {
        'target': 'targetCollection',
        'material': 'materialAcquisition'
      }
    }
  },
  methods: {
    handleClick(tab) {
			  this.activeName = tab.name
    }
  }
}
</script>

<style>
</style>
